// vite.config.js
import vue from '@vitejs/plugin-vue2'
import { resolve } from 'path'
import Components from 'unplugin-vue-components/vite'
import { VantResolver } from 'unplugin-vue-components/resolvers'

export default {
    server: {
        hmr: true
    },
    plugins: [
        vue(),
        // 配置的是vant组件的按需导入，vite才有的
        Components({
            resolvers: [VantResolver()]
        })
    ],

    resolve: {
        alias: {
            '@': resolve(__dirname, './src')
        }
    }
}
